package com.springboot.last_experiment.securityutil;

import org.springframework.security.web.authentication.WebAuthenticationDetails;

import javax.servlet.http.HttpServletRequest;

public class MyWebAuthenticationDetails extends WebAuthenticationDetails {
  /**
   *
   */
  private static final long serialVersionUID = 6975601077710753878L;

  private String username;

  private String password;



  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public MyWebAuthenticationDetails(HttpServletRequest request) {
    super(request);
    username = request.getParameter("name");
    password = request.getParameter("password");
    System.out.println(username);
    System.out.println(password);
  }
}
